package com.laicunba.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.laicunba.pojo.BaseDO;
import com.laicunba.pojo.UserDO;
import com.laicunba.pojo.vo.UserProfileVO;

public interface UserService extends BaseService {
	/**
	 * 根据手机号码(登录名即手机号码)查找用户
	 * 
	 * @param mobile
	 * @return
	 */
	UserDO findByMobile(String mobile);

	UserProfileVO getProfile(String userId);

	public List<UserDO> findListByInviteCode(String inviteCode);

	public List<Map<String, String>> findListByInviteFrom(String inviteFrom, String openDate);

	UserDO findByInviteCode(String inviteCode);

	UserDO findInviteUser(String userId);

	boolean isNewInvestor(String userId);

	boolean addRemainProfit(String userId, BigDecimal profit);

	boolean subtractRemainProfit(String userId, BigDecimal profit);

	public List<UserDO> findByBirthday(String birthday, int limit);

	int count();

	boolean isLoginPwdRight(UserDO user, String loginPwdEncrypt);

	String decryptAndSplitPwd(String encryptLoginPwd);

	public int countBidTimesHasBankInfo(String userId);

	boolean update2CurrentAccount(String uid);

	boolean isUsedCurrentAccount(String hType);

	/**
	 * 只更新 app客户端信息
	 * 
	 * @param user
	 * @return
	 */
	boolean updateAppInfo(UserDO user);

	/**
	 * 还回一种风险因素
	 * 
	 * @param uid
	 * @return
	 */
	String testDangerous(String uid);
	/**
	 * 
	 * @param pid
	 * @param userId
	 * @return
	 */
	boolean isPidBindByOtherUsr(String pid, String userId);

	int count(String beginDate, String endDate);
	/**
	 * 修改用户状态 
	 * @param uid
	 * @param newStatus  enable, disable, no-biz
	 * @param reson
	 * @return
	 */
	boolean updateStatus(String uid, String newStatus, String reson);

	boolean updateJzhStatus(String uid, String newStatus);
	/**
	 *  查找余额，包括活期，定期，节余，<span style='color:red'>但不包括未到期体验金</span>
	 *  <h4 style='color:red'>不可将该结果用于提现</h4>
	 * @param uid
	 * @return
	 */
	BigDecimal findBalance(String uid);

	List<UserDO> findByPid(String pid);

 

}
